package com.stud.common.utils.poi;

import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import org.apache.poi.hssf.util.HSSFColor;

/**
 * @author Stud
 * @title XXXXX
 * @desription XXXXX
 * @data 2022-12-10 11:57
 */
public class ExportParamsFactory {


    public static ExportParams buildDefault() {
        ExportParams exportParams = new ExportParams();
        exportParams.setColor(HSSFColor.HSSFColorPredefined.SKY_BLUE.getIndex());
        exportParams.setHeaderColor(HSSFColor.HSSFColorPredefined.SKY_BLUE.getIndex());
        exportParams.setType(ExcelType.XSSF);
        exportParams.setStyle(StudExcelExportStylerDefaultImpl.class);
        exportParams.setHeaderHeight(6.0);
        exportParams.setTitleHeight((short) 6);
        exportParams.setCreateHeadRows(true);
        exportParams.setDynamicData(false);
        exportParams.setAppendGraph(true);
        exportParams.setFixedTitle(true);
        exportParams.setMaxNum(0);
        exportParams.setHeight((short) 6);
        exportParams.setReadonly(false);

        return exportParams;
    }

}
